<ng-container *ngFor="let c of commentBodySegments">
  <ng-container *ngIf="c.__typename == 'CommentTextSegment'">
    <span [innerHtml]="c.text"> </span>
  </ng-container>
  <ng-container *ngIf="c.__typename == 'User'">
    <cvc-user-tag [user]="c"></cvc-user-tag>
  </ng-container>
  <ng-container *ngIf="c.__typename == 'CommentTagSegmentFlagged'">
    <ng-container [ngSwitch]="c.tagType">
      <span *ngSwitchCase="'VARIANT_GROUP'">
        <cvc-variant-group-tag
          [variantgroup]="{
            id: c.entityId,
            name: c.displayName,
            link: c.link,
            flagged: c.flagged
          }"></cvc-variant-group-tag>
      </span>
    </ng-container>
  </ng-container>
  <ng-container *ngIf="c.__typename == 'CommentTagSegmentFlaggedAndWithStatus'">
    <ng-container [ngSwitch]="c.tagType">
      <span *ngSwitchCase="'EVIDENCE_ITEM'">
        <cvc-evidence-tag
          [evidence]="{
            id: c.entityId,
            name: c.displayName,
            status: c.status,
            link: c.link,
            flagged: c.flagged
          }"></cvc-evidence-tag>
      </span>
      <span *ngSwitchCase="'ASSERTION'">
        <cvc-assertion-tag
          [assertion]="{
            id: c.entityId,
            name: c.displayName,
            status: c.status,
            link: c.link,
            flagged: c.flagged
          }"></cvc-assertion-tag>
      </span>
    </ng-container>
  </ng-container>
  <ng-container *ngIf="c.__typename == 'CommentTagSegmentFlaggedAndDeprecated'">
    <ng-container [ngSwitch]="c.tagType">
      <span *ngSwitchCase="'VARIANT'">
        <cvc-feature-variant-tag
          [variant]="{
            id: c.entityId,
            name: c.displayName,
            link: c.link,
            deprecated: c.deprecated,
            feature: c.feature,
            flagged: c.flagged
          }"></cvc-feature-variant-tag>
      </span>
      <span *ngSwitchCase="'MOLECULAR_PROFILE'">
        <cvc-molecular-profile-tag
          [molecularProfile]="{
            id: c.entityId,
            name: c.displayName,
            link: c.link,
            deprecated: c.deprecated,
            flagged: c.flagged
          }"></cvc-molecular-profile-tag>
      </span>
      <span *ngSwitchCase="'FEATURE'">
        <cvc-feature-tag
          [feature]="{
            id: c.entityId,
            name: c.displayName,
            link: c.link,
            deprecated: c.deprecated,
            flagged: c.flagged
          }"></cvc-feature-tag>
      </span>
    </ng-container>
  </ng-container>
  <ng-container *ngIf="c.__typename == 'CommentTagSegment'">
    <ng-container [ngSwitch]="c.tagType">
      <span *ngSwitchCase="'REVISION'">
        <!--<cvc-revision-tag-->
        <!--[revision]="{-->
        <!--id: c.entityId,-->
        <!--name: c.displayName,-->
        <!--link: c.link,-->
        <!--revisionSetId: c.revisionSetId!-->
        <!--}"></cvc-revision-tag>-->
        <nz-tag>
          <i
            nz-icon
            nzType="civic-revision"
            nzTheme="twotone"
            nzTwotoneColor="#F0673A"></i>
          {{ c.displayName }}
        </nz-tag>
      </span>
      <span *ngSwitchCase="'ORGANIZATION'">
        <cvc-organization-tag
          [org]="{
            id: c.entityId,
            name: c.displayName
          }"></cvc-organization-tag>
      </span>
      <span *ngSwitchCase="'ROLE'">
        <nz-tag
          ><i
            nz-icon
            nzType="civic-{{ c.displayName.slice(0, -1) }}"
            nzTheme="twotone"
            nzTwotoneColor="#A0D8F5"></i>
          {{ c.displayName }}</nz-tag
        >
      </span>
    </ng-container>
  </ng-container>
</ng-container>
